package com.aipolice.aipolice.pojo;

import javax.persistence.*;
import java.sql.Timestamp;
import java.util.Objects;

@Entity
@Table(name = "denews_", schema = "aipolice", catalog = "")
public class Denews {
    private int id;
    private String title;
    private String describe;
    private String titlePic;
    private Timestamp date;
    private Integer del;

    @Id
    @Column(name = "id")
    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    @Basic
    @Column(name = "title")
    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    @Basic
    @Column(name = "describe_")
    public String getDescribe() {
        return describe;
    }

    public void setDescribe(String describe) {
        this.describe = describe;
    }

    @Basic
    @Column(name = "title_pic")
    public String getTitlePic() {
        return titlePic;
    }

    public void setTitlePic(String titlePic) {
        this.titlePic = titlePic;
    }

    @Basic
    @Column(name = "date")
    public Timestamp getDate() {
        return date;
    }

    public void setDate(Timestamp date) {
        this.date = date;
    }

    @Basic
    @Column(name = "del")
    public Integer getDel() {
        return del;
    }

    public void setDel(Integer del) {
        this.del = del;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Denews denews = (Denews) o;
        return id == denews.id &&
                Objects.equals(title, denews.title) &&
                Objects.equals(describe, denews.describe) &&
                Objects.equals(titlePic, denews.titlePic) &&
                Objects.equals(date, denews.date) &&
                Objects.equals(del, denews.del);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, title, describe, titlePic, date, del);
    }
}
